using GridExtend;
using Services;
using System.Collections.Generic;
using UnityEngine;

public class BoxTrigger_Character : BoxTrigger<Character>
{
    protected CharacterManager characterManager;

    protected override void Awake()
    {
        base.Awake();
        characterManager = ServiceLocator.Get<ActionController>().CharacterManager;
    }

    protected override List<Character> GetContact(RectInt rect)
    {
        List<Vector2Int> positions = GridTool.GetIntPositions(rect);
        return characterManager.GetCharactersAt(positions);
    }
}
